<?php

/*

  Action	$4

  Trash a Copper from your hand. If you do, +$3.

 */

class MoneyLender extends Card implements iAction, iKingdom, iBasic {

    public function __construct() {
        parent::__construct("Money Lender", 4);
        $this->undoPlay = false;
        $this->undoBuy = true;
    }

    public function getDescription() {
        return array(
            "Trash a Copper from your hand. If you do, +$3.");
    }
    
    public function play(Game $game, $isRealCard) {
        $copper = $game->moveCardFromPileToPile("Copper", PlayHand, Trash);
        if ($copper) {
            $game->addMoney(new Price(3));
             ScreenDisplay::addScreenMessage($game, true, "trash ".  nicePrint($copper)." and get +3$", "trashes ".ScreenDisplay::$LMSG." and gets +3$");
        }
        else {
            ScreenDisplay::addScreenMessage($game, true, "trash nothing", "trashes nothing");
        }
        $game->cardActionFinished();
        return true;
    }

}

?>